#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time    : 2018/5/18 0018 上午 11:30
# @Author  : Jython <ijython@qq.com>
# @File    : Grequest.py

from flask import jsonify, Response
class Gresponse(Response):
	"""
	http统一钩子方法
	"""
	@classmethod
	def force_type( cls, response, environ=None ):
		print("resp")
		if isinstance(response, (list, dict)):
			response = jsonify(response)
		return super(Response, cls).force_type(response, environ)
